/**
 * 铁架台
 */
Bottle = Widget.extend({
	ctor:function(parent){
		this._super();
		parent.addChild(this,29);
		this.setTag(TAG_BOTTLE);
		this.init();
	},
	init : function(){
		this.setVisible(false);
		this.setCascadeOpacityEnabled(true);

		var bottle=new Button(this,10,TAG_BOTTLE1,"#run/bottle.png",this.callback,this);
	},

	callback:function(p){
		var func=cc.callFunc(function() {
			gg.flow.next();
		}, this);
		switch (p.getTag()) {
		case TAG_BOTTLE1:
			var ber=cc.bezierBy(1, [cc.p(0, 50),cc.p(35,120),cc.p(80, 150)]);
			var rotate=cc.rotateBy(1,35);
			p.runAction(cc.sequence(cc.spawn(cc.sequence(ber,rotate),cc.sequence(cc.delayTime(1),cc.callFunc(function() {
				ll.run.testtube.putTesttube();
			}, this))),cc.spawn(cc.delayTime(2),cc.callFunc(function() {
				ll.run.testtube.upLine();
			}, this)),cc.spawn(cc.sequence(rotate.reverse(),ber.reverse()),cc.sequence(cc.callFunc(function() {
				ll.run.testtube.putTesttube1();
			}, this),cc.delayTime(1)),cc.callFunc(function() {
				p.removeFromParent(true);
			}, this),func)));
			break;
		default:
			break;
		}
	}
});
